package com.ycy.doors;

import java.util.ArrayList;
import java.util.List;

public class Node {
    private String identifier;
    private String title;
    private String text;
    private List<Node> children = new ArrayList<>();
    
    // 构造器
    public Node(String identifier, String title, String text) {
        this.identifier = identifier;
        this.title = title;
        this.text = text;
    }
    
    public String getText() {
        return text;
    }
    
    public void setText(String text) {
        this.text = text;
    }
    
    // 添加子节点
    public void addChild(Node child) {
        children.add(child);
    }
    
    // 获取和设置属性的方法
    public String getIdentifier() {
        return title;
    }
    
    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public List<Node> getChildren() {
        return children;
    }
    
    public void setChildren(List<Node> children) {
        this.children = children;
    }
}
